#include "FileWriter.h"

namespace baker
{
    //--------------------------------------------------------------------------
    FileWriter::FileWriter( const gchar * filename )
        : mChannel( NULL )
    {
        mChannel = g_io_channel_new_file( filename
                                        , "r"
                                        , NULL
                                        );
    }

    //--------------------------------------------------------------------------
    FileWriter::~FileWriter()
    {
        if ( NULL != mChannel )
        {
            g_io_channel_shutdown( mChannel, TRUE, NULL );
            mChannel = NULL;
        }
    }

    //--------------------------------------------------------------------------
}
